import request from '@/utils/request'

export function inspectListNoPage() {
  return request({
    url: "/infield-basic-data/listNoPage",
    method: "get",
  });
}

export function inspectQueryById(data) {
  return request({
    url: "/infield-basic-data/queryById",
    method: "get",
    params:data,
  });
}

export function inspectAdd(data) {
  return request({
    url: "/infield-vehicle-equipment-inspect/add",
    method: "post",
    data:data,
  });
}


export function inspectListByPage(data) {
  return request({
    url: "/infield-vehicle-equipment-inspect/listByPage",
    method: "post",
    params:{
      pageNum:data.page,
      pageSize:10,
    },
    data:data,
  });
}

export function queryById(data) {
  return request({
    url: "/infield-vehicle-equipment-inspect/queryById",
    method: "get",
    params:data,
  });
}



export function update(data) {
  return request({
    url: "/infield-vehicle-equipment-inspect/update",
    method: "put",
    data:data,
  });
}


export function checkByWagonNumber(data) {
  return request({
    url: "/infield-vehicle-equipment-inspect/checkByWagonNumber",
    method: "get",
    params:data,
  });
}

// export function uploadFile(data) {
//   return request({
//     url: "/file/uploadFile",
//     method: "get",
//     params:data,
//   });
// }

// 上传文件
export function uploadFile (data, condition, onUploadProgress) {
  var forms = new FormData();
  forms.append("file", data);
  return request({
    url: "/file/uploadFile ",
    method: "post",
    data: forms,
    onUploadProgress: onUploadProgress,
  });
}